package org.lds.logger.xml;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class XMLRollingStrategy {
    @XStreamAlias("name")
    @XStreamAsAttribute
    private String name;
    @XStreamAlias("clazz")
    @XStreamAsAttribute
    private String clazz;
    @XStreamAlias("maxFileSize")
    private String maxFileSize;

    @XStreamAlias("maxAllFileSize")
    private String maxAllFileSize;
    @XStreamAlias("maxFileCount")
    private String maxFileCount;
    @XStreamAlias("maxFileReserveDayCount")
    private String maxFileReserveDayCount;

    @XStreamAlias("compressType")
    private String compressType;

    @XStreamAlias("extJson")
    private String extJson;

    public XMLRollingStrategy(String name, String clazz, String maxFileSize, String maxAllFileSize, String maxFileCount, String maxFileReserveDayCount) {
        this.name = name;
        this.clazz = clazz;
        this.maxFileSize = maxFileSize;
        this.maxAllFileSize = maxAllFileSize;
        this.maxFileCount = maxFileCount;
        this.maxFileReserveDayCount = maxFileReserveDayCount;
    }
}
